package top.oneit.jdownload.test;

import de.jensd.fx.glyphs.fontawesome.FontAwesomeIcon;
import de.jensd.fx.glyphs.fontawesome.FontAwesomeIconView;
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.Label;
import javafx.scene.layout.HBox;
import javafx.scene.layout.Priority;
import javafx.scene.text.Font;
import javafx.stage.Stage;

/**
 * @author lingkang
 * Created by 2021/12/6
 */
public class MyHeader extends Application {
    @Override
    public void start(Stage primaryStage) throws Exception {

        FontAwesomeIconView train =new FontAwesomeIconView(FontAwesomeIcon.TIMES);
        //train.setFont(Font.font(12));
        Label label=new Label();
        label.setGraphic(train);

        label.setFont(Font.font(20));


        HBox left = new HBox();
        HBox right = new HBox(label);
        HBox ALWAYS = new HBox();
        ALWAYS.setHgrow(new HBox(), Priority.ALWAYS);
        HBox box = new HBox(left, ALWAYS, right);
        primaryStage.setWidth(200);
        primaryStage.setHeight(200);
        primaryStage.setScene(new Scene(box));
        primaryStage.show();
    }

    public static void main(String[] args) {
        launch(args);
    }
}
